package com.youxin.busfoundation.enums;

/**
 * 线索池状态变更
 * @author yingde.cao
 *
 */
public enum LeadsPoolType {	
	
	Initial(0,"加入线索池"),
	
	Assign(1,"分配"),
	
	Request(2,"认领"),
	
	StatusChange(3,"状态变更"),
	
	ReleaseLeads(4,"释放线索"),
	
	TransferLeads(5,"线索流转")
	;

	public int getValue() {
		return value;
	}
	
	private String name;
	
	private int value;
	private LeadsPoolType(int value,String name) {
		this.value = value;
		this.name=name;
	}
	
	
	
	public String getName() {
		return name;
	}



	public void setName(String name) {
		this.name = name;
	}



	public void setValue(short value) {
		this.value = value;
	}



	public static LeadsPoolType valueOf(short val)
	{			
		for(LeadsPoolType m : LeadsPoolType.values()) 
		{
			if(val==m.getValue())
				return m;
	    }
		return null;
	}
	
	public static String stringValue(Short val)
	{
		if(val==null)
		{
			return "";
		}
		LeadsPoolType status=valueOf(val);
		if(status==null)
		{
			return "";
		}
		return status.getName();
	}
	
	
	
}
